{% if projects_persistence|bool and projects_existing_claim == '' %}
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
  name: '{{ ansible_operator_meta.name }}-projects-claim'
  namespace: '{{ ansible_operator_meta.namespace }}'
  labels:
    {{ lookup("template", "../common/templates/labels/common.yaml.j2") | indent(width=4) | trim }}
spec:
  accessModes:
    - {{ projects_storage_access_mode }}
  resources:
    requests:
      storage: {{ projects_storage_size }}
{% if projects_storage_class is defined %}
  storageClassName: {{ projects_storage_class }}
{% endif %}
{% endif %}
